import Toast from 'react-native-toast-message';

export const ToastMessage = {
  // Warning messages
  warning: (text: string) => {
    Toast.show({
      type: 'tips',
      text1: text,
      props: {
        _type: 'warning',
      },
    });
  },
  // success messages
  success: (text: string) =>
    Toast.show({
      type: 'tips',
      text1: text,
      props: {
        _type: 'success',
      },
    }),
  // error messages
  error: (text: string) =>
    Toast.show({
      type: 'tips',
      text1: text,
      props: {
        _type: 'warning',
      },
    }),
  //loading messages
  loading: (text: string) =>
    Toast.show({
      type: 'tips',
      text1: text,
      props: {
        _type: 'loading',
      },
    }),
};
